<?php

//get e-member role
function dk_get_e_member(){
	global $auth;	global $emember_config;	$all_levels = dbAccess::findAll(WP_EMEMBER_MEMBERSHIP_LEVEL_TABLE, ' id != 1 ', ' id DESC ');	$member_id = $auth->getUserInfo('member_id'); 	$editingrecord = dbAccess::find(WP_EMEMBER_MEMBERS_TABLE_NAME, ' member_id=' . $member_id);
		foreach($all_levels as $level){		if($level->id == $editingrecord->membership_level){			$user_role= $level->alias;		}	}	return $user_role;
}